package com.hymjweb.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class AppController {

    @GetMapping("/index")
    public String index(HttpServletRequest request){
        request.setAttribute("username","Jack Li");
        return "index";
    }

    @GetMapping("/main")
    public String main(){
        return "main";
    }


}
